#include <iostream>
#include <vector>
#include <queue>
using namespace std;

const int N = 2e5 + 1;

vector<vector<int>> edges(N); // 存有向图的信息
int in[N]; // 统计入度
queue<int> q;

int n, m;
vector<int> ret;

int main()
{
    cin >> n >> m;
    for (int i = 0; i < m; i++)
    {
        int a, b;
        cin >> a >> b;
        edges[a].push_back(b);
        in[b]++;
    }
    for (int i = 1; i <= n; i++)
        if (in[i] == 0)
            q.push(i);
    while (q.size())
    {
        int a = q.front();
        ret.push_back(a);
        q.pop();
        for (auto e : edges[a])
            if (--in[e] == 0)
                q.push(e);
    }
    if (ret.size() == n)
    {
        for (int i = 0; i < ret.size() - 1; i++)
            cout << ret[i] << " ";
        cout << ret[n - 1];
    }
    else cout << -1 << endl;
    return 0;
}
